<?php

define("_SessionName", "checkAccount");
require("header.php");

if ($_POST["psd"] == "") {
    $sql = "SELECT * FROM `account` WHERE `account`='{$_POST["account"]}'";
}
else {
    $sql = "SELECT * FROM `account` WHERE `account`='{$_POST["account"]}' AND `psd`='{$_POST["psd"]}'";
}

// echo $sql . "\n";

$result = $conn->query($sql);

if ($result->num_rows > 0) {
    echo "true";
}
else {
    echo "false";
}
 
$conn->close();

?>